package com.level2app.view.dialog;

import android.content.Context;
import android.view.Gravity;

import com.level2app.R;
import com.level2app.databinding.DialogChooseEmailBinding;
import com.level2app.databinding.DialogChooseHeadBinding;

/*
 * Author: S
 * Date: 2024/9/7
 * 更换头像弹窗
 */
public abstract class ChooseHeadDialog extends BaseCommonBottomDialog<DialogChooseHeadBinding> {

    public ChooseHeadDialog(Context context) {
        super(context);
    }

    @Override
    protected void initView() {
        mBinding.cancelTv.setOnClickListener(o -> {
            dismiss();
        });
        mBinding.takePhotoTv.setOnClickListener(o -> {
            takePhoto();
            dismiss();
        });
        mBinding.choosePhotoTv.setOnClickListener(o -> {
            choosePhoto();
            dismiss();
        });
    }

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_choose_head;
    }

    @Override
    protected int getGravity() {
        return Gravity.BOTTOM;
    }

    @Override
    protected int getAnimations() {
        return R.style.dialog_no_anim;
    }


    public abstract void takePhoto();

    public abstract void choosePhoto();
}